<template>
	<!-- 系统目录 西成药品 -->
	<div class="MedicenCata">
		<!--  描述  -->
		<div class="header">
			<div class="header-icon">
				<i class="el-icon-xy"
					style="border-radius: 50%;font-size: 20px;padding: 6px;margin-left: 8px;;background-color: #409EFF;color: #fff;"></i>
				<span style="font-size: 12px;font-weight:400;margin-left: 12px;">西成药品基本目录管理</span>
			</div>
		</div>
		<!-- main -->
		<div class="main">
			<!-- left -->
			<div class="main-left">
				<!-- tree -->
				<el-tree 
				:data="data" 
				:props="defaultProps"
				node-key="label"
			    :default-expanded-keys="['全部']"
				accordion 
				@node-click="handleNodeClick"
				class="custom-tree"
				>
					<span class="custom-tree-node" slot-scope="{ node, data }" style="font-size: 12px;">
						<span :name="node.label">
							<i v-if="!data.children"
							:class="node.expanded ? 'el-icon-openFile' : 'el-icon-closeFiles'"></i>
							<i v-else class="el-icon-openFile"></i>{{ node.label }}
						</span>
					</span>
				</el-tree>
			</div>
			<!-- right -->
			<div class="main-right">
				<!-- tit -->
				<div class="main-icon">
					<div class="main-icon-a">
						<i :class="iconComes" style="border-radius: 50%;font-size: 20px;padding: 6px;margin-left: 8px;;background-color: #5a5a5a;color: #fff;"></i>
						<span style="font-size: 12px;font-weight:bold;margin-left: 12px;color: #606266;">{{ CatalogueName }}</span>
					</div>
					<!-- btn1 -->
					<div class="main-icon-b">
						<span style="font-size: 12px;color: #606266;font-weight: bold;">状态：</span>
						<el-dropdown @command="handleCommand" trigger="click">
							<span class="el-dropdown-link">{{ DropDownedName }}<i class="el-icon-down"></i></span>
							<el-dropdown-menu slot="dropdown">
							  <el-dropdown-item command="a">可用</el-dropdown-item>
							  <el-dropdown-item command="b">禁用</el-dropdown-item>
							  <el-dropdown-item command="c" divided>全部</el-dropdown-item>
							</el-dropdown-menu>
					    </el-dropdown>
					</div>
					<!-- btn2 -->
					<div class="main-icon-c">
						<span style="font-size: 12px;color: #606266;font-weight: bold;display: inline-block;width: 68px;">关键字：</span>
						<el-input size="mini" placeholder="编码、名称、拼音简码" suffix-icon="el-icon-key" v-model="searchValue"></el-input>
					</div>
					<!-- btn3 -->
					<div class="main-icon-c">
						<el-button v-for="(v,i) in headerBtn" :key="i" :type="v.type" :loading="loading" :icon="v.icon" size="mini" @click="handClick(i)">{{ v.title }}</el-button>
					</div>
				</div>
				<!-- messagesBox -->
				<div class="addmessagesBox">
					<el-dialog
					  title="新增西成药目录"
					  :visible.sync="addDialogVisible"
					  width="880px"
					  :before-close="handleClose">
					  <!-- messagesBox / tabs -->
					  <div class="tabs">
						  <el-form :model="addForm" :inline="true" size="mini" ref="addForm" :rules="addFormRules">
							    <div class="addformhead">
									<el-form-item label="" prop="drugName">
										<span style="width: 68px;font-size: 12px;font-weight: bold;">药典名称:</span>
										<el-select popper-class="selectFrom" value-key="key" v-model="addForm.drugName" filterable placeholder="" remote
										  reserve-keyword :remote-method="remoteMethod" @change="handClickName"  @focus="foucshandClickName">
											<el-option
											  v-for="(item,index) in SelectName"
											  :key="item.id"
											  :label="item.genericName"
											  :value="item">
											  <!-- 选择框 -->
											  <div class="abox">
												<!-- 文字提示 -->
												<span class="fixedData">编码：</span>
												<el-tooltip :content="item.code" placement="top">
												  <span class="Adata">{{ item.code }}</span>
												</el-tooltip>
												<!-- 文字提示 -->
												<span class="fixedData">名称：</span>
												<el-tooltip :content="item.genericName" placement="top">
												  <span class="Adata">{{ item.genericName }}</span>
												</el-tooltip>
												<!-- 文字提示 -->
												<span class="fixedData">药品剂型：</span>
												<el-tooltip :content="item.drugDosage" placement="top">
												  <span class="Adata">{{ item.drugDosage }}</span>
												</el-tooltip>
												<!-- 文字提示 -->
												<span class="fixedData">药品类型：</span>
												<el-tooltip :content="item.drugType" placement="top">
												  <span class="Adata">{{ item.drugType }}</span>
												</el-tooltip>
											  </div>
											</el-option>
										</el-select>
										<span style="color: brown;margin-left: 12px;margin-right: 12px;">*</span>
										<el-button plain>详细[F2]</el-button>
									</el-form-item>
								</div>
								<el-form-item class="addformheadA" label="" prop="drugDosageForm">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">药品剂型:</span>
									<el-input v-model="addForm.drugDosageForm" style="width:137px;" :disabled="disabledInput"></el-input>
								</el-form-item>
								<el-form-item class="addformheadA" label="" prop="drugType">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">药品类型:</span>
									<el-input v-model="addForm.drugType" style="width:137px;" :disabled="disabledInput"></el-input>
								</el-form-item>
									
								<el-form-item class="addformheadA" label="" prop="isAntiBiot">
									<span style="font-size: 12px;width: 52px;margin-right:2px;font-weight: bold;">抗生素否:</span>
									<el-checkbox v-model="isAntiBiot" @change="isAntiBiotChange"></el-checkbox>
								</el-form-item>	
								<el-form-item class="addformheadA" label="" prop="isSkinTest">
									<span style="font-size: 12px;width: 52px;margin-right:2px;font-weight: bold;">皮试否:</span>
									<el-checkbox v-model="isSkinTest" @change="isSkinTestChange"></el-checkbox>
								</el-form-item>	
								<!-- boxlist2 -->
								<div class="addformheadB">
									<!-- 第一列 -->
									<div class="addOne">
										<el-form-item label="" prop="coding" required>
											<span style="width: 68px;font-size: 12px;font-weight: bold;">编码:</span>
											<el-input v-model="addForm.coding" style="width:137px;"></el-input>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="drugAlias">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">药品别名:</span>
											<el-input v-model="addForm.drugAlias" style="width:137px;" @input="drugAliasInput"></el-input>
										</el-form-item>
										<el-form-item label="" prop="drugSpecifications" required>
											<span style="width: 68px;font-size: 12px;font-weight: bold;">药品规格:</span>
											<el-input v-model="addForm.drugSpecifications" style="width:137px;"></el-input>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="packingUnit" required>
											<span>包装单位:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.packingUnit" placeholder="">
												   <el-option v-for="item in oop" :key="item.value" :label="item.title" :value="item.title">
													   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
													   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
												   </el-option>
												</el-select>
											</div>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="basicDrug">
											<span>基本药物:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.basicDrug" placeholder="" @change="basicChance">
												   <el-option v-for="item in basicOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="weightType">
											<span>贵重类型:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.weightType" placeholder="" @change="weightTypeChange">
												   <el-option v-for="item in weightTypeOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="dddvalue">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">DDD值:</span>
											<el-input v-model="addForm.dddvalue" style="width:137px;"></el-input>
											<span style="font-size: 12px;margin-left: 8px;font-weight: 300;">g</span>
										</el-form-item>
										<el-form-item label="" prop="limitMedication">
											<span>限量用药:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.limitMedication" placeholder="" @change="limitMedicationChange">
												   <el-option v-for="item in YNOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="dissolvingMeasure">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">溶媒量:</span>
											<el-input v-model="addForm.dissolvingMeasure" style="width:137px;"></el-input>
											<span style="font-size: 12px;margin-left: 8px;font-weight: 300;">Ml</span>
										</el-form-item>
										<el-form-item label="" prop="storageConditions">
											<span>储存条件:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.storageConditions" placeholder="" @change="storageConditionsChange">
												   <el-option v-for="item in storageConditionsOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
									</div>
									<!-- 第二列 -->
									<div class="addOne2">
										<el-form-item label="" prop="drugName">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">药品名称:</span>
											<el-input v-model="addForm.drugName"></el-input>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="aliasSimpCode">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">别名简码:</span>
											<el-input v-model="addForm.aliasSimpCode"></el-input>
										</el-form-item>
										<el-form-item label="" prop="packageSpecifications">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">包装规格:</span>
											<el-input v-model="addForm.packageSpecifications"></el-input>
										</el-form-item>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="packingNum">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">包装数量:</span>
												<el-input v-model="addForm.packingNum" style="width: 56px;"></el-input>
												<span class="star">*</span>
											</el-form-item>
											<el-form-item label="" prop="minUnit">
												<span style="width: 52px;">最小单位:</span>
												<div class="double" style="display: flex;">
													<el-select v-model="addForm.minUnit" placeholder="">
													   <el-option v-for="item in oop" :key="item.value" :label="item.title" :value="item.title">
														   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
														   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
													   </el-option>
													</el-select>
													<span class="star">*</span>
												</div>
											</el-form-item>
										</div>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="basicType">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">基药类型:</span>
												<div class="double" style="display: flex;">
													<el-select v-model="addForm.basicType" placeholder="" :disabled="OrNot">
													   <el-option v-for="item in basicTypeOptions" :key="item.value" :label="item.label" :value="item.value">
														   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
													   </el-option>
													</el-select>
												</div>
											</el-form-item>
											<el-form-item label="" prop="isProtect">
												<span style="width: 52px;">避光药品:</span>
												<div class="double" style="display: flex;">
													<el-select v-model="addForm.isProtect" placeholder="">
													   <el-option v-for="item in YNOptions" :key="item.value" :label="item.label" :value="item.value">
														   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
													   </el-option>
													</el-select>
												</div>
											</el-form-item>
										</div>
										
										<el-form-item label="" prop="medicationMethod">
											<span>默认给药方式:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.medicationMethod" placeholder="请选择" @change="medicationMethodChange">
												   <el-option v-for="item in medicationMethodOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="sourceClassification">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">来源分类:</span>
											<el-input v-model="addForm.sourceClassification"></el-input>
										</el-form-item>
										<el-form-item label="" prop="effectiveStatus">
											<span>有效状态:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.effectiveStatus" placeholder="">
												   <el-option v-for="item in effectiveStatusOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="weight">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">权重:</span>
											<el-input v-model="addForm.weight"></el-input>
										</el-form-item>
										<el-form-item label="" prop="material">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">材质:</span>
											<el-input v-model="addForm.material"></el-input>
										</el-form-item>
										
									</div>
									<!-- 第三列 -->
									<div class="addOne3">
										<el-form-item label="" prop="simpCode">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">拼音简码:</span>
											<el-input v-model="addForm.simpCode"></el-input>
											<!-- <span style="color: brown;">*</span> -->
										</el-form-item>
										<el-form-item label="" prop="ranges">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">适用范围:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="addForm.ranges" placeholder="请选择">
												   <el-option v-for="item in AoeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
												</el-select>
											</div>
										</el-form-item>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="unitDoseNum">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">单位剂量:</span>
												<el-input v-model="unitDoseNum" style="width: 58px;" @input="unitDoseNumChangce"></el-input>
												<span class="star">*</span>
											</el-form-item>
											<el-form-item label="" prop="unitDose">
												<div class="double" style="display: flex;">
													<el-select v-model="addForm.unitDose" placeholder="请选择" @change="unitDoseChance">
													   <el-option v-for="item in oop1" :key="item.value" :label="item.title" :value="item.title">
														   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
														   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
													   </el-option>
													</el-select>
													<span class="star">*</span>
												</div>
											</el-form-item>
										</div>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="minDoseNum">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">最小剂量:</span>
												<el-input v-model="minDoseNum" style="width: 58px;" @input="minDoseNumChangce"></el-input>
												<span class="star">*</span>
											</el-form-item>
											<el-form-item label="" prop="minDose">
												<div class="double" style="display: flex;">
													<el-select v-model="addForm.minDose" placeholder="请选择" @change="minDoseChance">
													   <el-option v-for="item in oop1" :key="item.value" :label="item.title" :value="item.title">
														   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
														   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
													   </el-option>
													</el-select>
													<span class="star">*</span>
												</div>
											</el-form-item>
										</div>
										<el-form-item label="" prop="qualityCategory">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">质量类别:</span>
											<el-select v-model="addForm.qualityCategory" placeholder="" @change="quiltyChange">
											   <el-option v-for="item in quiltyOptions" :key="item.value" :label="item.value" :value="item.value">
												   <span style="float: center; color: #8492a6; font-size: 12px;">{{ item.value }}</span>
											   </el-option>
											</el-select>
										</el-form-item>
										<el-form-item label="" prop="medicationFrequency">
											<span style="width: 88px;font-size: 12px;font-weight: bold;">默认用药频率:</span>
											<el-select v-model="addForm.medicationFrequency" placeholder="" @change="medicationFrequencyChange">
											   <el-option v-for="item in medicationFrequencyOptions" :key="item.value" :label="item.value" :value="item.value">
												   <span style="float: center; color: #8492a6; font-size: 12px;">{{ item.value }}</span>
											   </el-option>
											</el-select>
										</el-form-item>
										<el-form-item label="" prop="strengthCoefficient">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">强度系数:</span>
											<el-input v-model="addForm.strengthCoefficient"></el-input>
										</el-form-item>
										<el-form-item label="" prop="withdrawalDays">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">停药天数:</span>
											<el-input v-model="addForm.withdrawalDays"></el-input>
										</el-form-item>
										<el-form-item label="" prop="contentsName">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">目录名称:</span>
											<el-input v-model="addForm.contentsName"></el-input>
										</el-form-item>
										<el-form-item label="" prop="limitQuantity">
											<span style="width: 88px;font-size: 12px;font-weight: bold;">门诊限制总量:</span>
											<el-input v-model="addForm.limitQuantity"></el-input>
										</el-form-item>
									</div>		
								</div>
									<div class="addOne4">
										<el-form-item label="" prop="limitDays">
											<span style="width: 88px;font-size: 12px;font-weight: bold;">门诊限制天数:</span>
											<el-input v-model="addForm.limitDays" style="width:137px;"></el-input>
										</el-form-item>
										<el-form-item label="" prop="remake">
											<span style="width: 88px;font-size: 12px;font-weight: bold;margin-left: 24px;">限定备注:</span>
											<el-input type="textarea" resize="none" :autosize="{ minRows: 1, maxRows: 1}" maxlength="50" placeholder="请输入内容" v-model="addForm.remake">
											</el-input>
										</el-form-item>
									</div>
								<!-- tble -->
								<el-form-item label="" prop="drugDosageForm">
									<div class="oneLineBox">
										<div style="display: flex;justify-content: space-between;list-style: none;">
											<span style="width: 72px;font-weight: bold;font-size: 12px;margin-left: 12px;">厂家信息:</span>
											<li><el-button v-for="(v,i) in boxaBtn" :key="i" :type="v.type" :icon="v.icon" size="medium" @click="boxaBtnHandClick(i)"></el-button></li>
										</div>
										<el-table :data="ManufacturerData" border align="center" style="width:788px;margin-left: 12px;">
										    <el-table-column fixed="left" label="行号" type="index" width="48"></el-table-column>
										    <el-table-column v-for="(col, inx) in SelectManufacturer" :key="inx" :type="col.type" :prop="col.prop" :label="col.name" :width="columnWidth(col, tableData)"></el-table-column>
										</el-table>
									</div>
								</el-form-item>
						  </el-form>
					  </div>
					  <span slot="footer" class="dialog-footer">
					    <el-button type="primary" @click="addNewData" size="mini">保存</el-button>
					    <el-button type="info" @click="addDialogVisible = false" size="mini">下次一定</el-button>
					  </span>
					</el-dialog>
				</div>
				<!-- 编辑西成药目录 -->
				<div class="editmessagesBox">
					<el-dialog
					  :title="watch"
					  :visible.sync="editManufacturerDiglog"
					  width="880px"
					  :before-close="handleClose">
					  <!-- messagesBox / tabs -->
					  <div class="tabs">
						  <el-form :model="watchData" :inline="true" size="mini" ref="watchData" :rules="addFormRules" :disabled="editdisabled">
							    <div class="addformhead">
									<el-form-item label="" prop="drugName">
										<span style="width: 68px;font-size: 12px;font-weight: bold;">药典名称:</span>
										<el-select popper-class="selectFrom" value-key="key" v-model="watchData.drugName" filterable placeholder="" remote
										  reserve-keyword :remote-method="remoteMethod" @change="editHandClickName"  @focus="foucshandClickName">
											<el-option
											  v-for="(item,index) in SelectName"
											  :key="item.id"
											  :label="item.genericName"
											  :value="item">
											  <!-- 选择框 -->
											  <div class="abox">
												<!-- 文字提示 -->
												<span class="fixedData">编码：</span>
												<el-tooltip :content="item.coding" placement="top">
												  <span class="Adata">{{ item.coding }}</span>
												</el-tooltip>
												<!-- 文字提示 -->
												<span class="fixedData">名称：</span>
												<el-tooltip :content="item.genericName" placement="top">
												  <span class="Adata">{{ item.genericName }}</span>
												</el-tooltip>
												<!-- 文字提示 -->
												<span class="fixedData">药品剂型：</span>
												<el-tooltip :content="item.drugDosage" placement="top">
												  <span class="Adata">{{ item.drugDosage }}</span>
												</el-tooltip>
												<!-- 文字提示 -->
												<span class="fixedData">药品类型：</span>
												<el-tooltip :content="item.drugType" placement="top">
												  <span class="Adata">{{ item.drugType }}</span>
												</el-tooltip>
											  </div>
											</el-option>
										</el-select>
										<span style="color: brown;margin-left: 12px;margin-right: 12px;">*</span>
										<el-button plain>详细[F2]</el-button>
									</el-form-item>
								</div>
								<el-form-item class="addformheadA" label="" prop="drugDosageForm">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">药品剂型:</span>
									<el-input v-model="watchData.drugDosageForm" style="width:137px;" :disabled="disabledInput"></el-input>
								</el-form-item>
								<el-form-item class="addformheadA" label="" prop="drugType">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">药品类型:</span>
									<el-input v-model="watchData.drugType" style="width:137px;" :disabled="disabledInput"></el-input>
								</el-form-item>
									
								<el-form-item class="addformheadA" label="" prop="isAntiBiot">
									<span style="font-size: 12px;width: 52px;margin-right:2px;font-weight: bold;">抗生素否:</span>
									<el-checkbox v-model="isAntiBiot" @change="isAntiBiotChange"></el-checkbox>
								</el-form-item>	
								<el-form-item class="addformheadA" label="" prop="isSkinTest">
									<span style="font-size: 12px;width: 52px;margin-right:2px;font-weight: bold;">皮试否:</span>
									<el-checkbox v-model="isSkinTest" @change="isSkinTestChange"></el-checkbox>
								</el-form-item>	
								<!-- boxlist2 -->
								<div class="addformheadB">
									<!-- 第一列 -->
									<div class="addOne">
										<el-form-item label="" prop="coding" required>
											<span style="width: 68px;font-size: 12px;font-weight: bold;">编码:</span>
											<el-input v-model="watchData.coding" style="width:137px;"></el-input>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="drugAlias">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">药品别名:</span>
											<el-input v-model="watchData.drugAlias" style="width:137px;" @input="drugAliasInput"></el-input>
										</el-form-item>
										<el-form-item label="" prop="drugSpecifications" required>
											<span style="width: 68px;font-size: 12px;font-weight: bold;">药品规格:</span>
											<el-input v-model="watchData.drugSpecifications" style="width:137px;"></el-input>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="packingUnit" required>
											<span>包装单位:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.packingUnit" placeholder="">
												   <el-option v-for="item in oop" :key="item.value" :label="item.title" :value="item.title">
													   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
													   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
												   </el-option>
												</el-select>
											</div>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="basicDrug">
											<span>基本药物:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.basicDrug" placeholder="" @change="basicChance">
												   <el-option v-for="item in basicOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="weightType">
											<span>贵重类型:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.weightType" placeholder="" @change="weightTypeChange">
												   <el-option v-for="item in weightTypeOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="dddvalue">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">DDD值:</span>
											<el-input v-model="watchData.dddvalue" style="width:137px;"></el-input>
											<span style="font-size: 12px;margin-left: 8px;font-weight: 300;">g</span>
										</el-form-item>
										<el-form-item label="" prop="limitMedication">
											<span>限量用药:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.limitMedication" placeholder="" @change="limitMedicationChange">
												   <el-option v-for="item in YNOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="dissolvingMeasure">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">溶媒量:</span>
											<el-input v-model="watchData.dissolvingMeasure" style="width:137px;"></el-input>
											<span style="font-size: 12px;margin-left: 8px;font-weight: 300;">Ml</span>
										</el-form-item>
										<el-form-item label="" prop="storageConditions">
											<span>储存条件:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.storageConditions" placeholder="" @change="storageConditionsChange">
												   <el-option v-for="item in storageConditionsOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
									</div>
									<!-- 第二列 -->
									<div class="addOne2">
										<el-form-item label="" prop="drugName">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">药品名称:</span>
											<el-input v-model="watchData.drugName"></el-input>
											<span style="color: brown;">*</span>
										</el-form-item>
										<el-form-item label="" prop="aliasSimpCode">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">别名简码:</span>
											<el-input v-model="watchData.aliasSimpCode"></el-input>
										</el-form-item>
										<el-form-item label="" prop="packageSpecifications">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">包装规格:</span>
											<el-input v-model="watchData.packageSpecifications"></el-input>
										</el-form-item>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="packingNum">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">包装数量:</span>
												<el-input v-model="watchData.packingNum" style="width: 56px;"></el-input>
												<span class="star">*</span>
											</el-form-item>
											<el-form-item label="" prop="minUnit">
												<span style="width: 52px;">最小单位:</span>
												<div class="double" style="display: flex;">
													<el-select v-model="watchData.minUnit" placeholder="">
													   <el-option v-for="item in oop" :key="item.value" :label="item.title" :value="item.title">
														   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
														   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
													   </el-option>
													</el-select>
													<span class="star">*</span>
												</div>
											</el-form-item>
										</div>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="basicType">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">基药类型:</span>
												<div class="double" style="display: flex;">
													<el-select v-model="watchData.basicType" placeholder="" :disabled="OrNot">
													   <el-option v-for="item in basicTypeOptions" :key="item.value" :label="item.label" :value="item.value">
														   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
													   </el-option>
													</el-select>
												</div>
											</el-form-item>
											<el-form-item label="" prop="isProtect">
												<span style="width: 52px;">避光药品:</span>
												<div class="double" style="display: flex;">
													<el-select v-model="watchData.isProtect" placeholder="">
													   <el-option v-for="item in YNOptions" :key="item.value" :label="item.label" :value="item.value">
														   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
													   </el-option>
													</el-select>
												</div>
											</el-form-item>
										</div>
										
										<el-form-item label="" prop="medicationMethod">
											<span>默认给药方式:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.medicationMethod" placeholder="请选择" @change="medicationMethodChange">
												   <el-option v-for="item in medicationMethodOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="sourceClassification">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">来源分类:</span>
											<el-input v-model="watchData.sourceClassification"></el-input>
										</el-form-item>
										<el-form-item label="" prop="effectiveStatus">
											<span>有效状态:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.effectiveStatus" placeholder="">
												   <el-option v-for="item in effectiveStatusOptions" :key="item.value" :label="item.label" :value="item.value">
													   <span style="float: center; color: #8492a6; font-size: 12px">{{ item.label }}</span>
												   </el-option>
												</el-select>
											</div>
										</el-form-item>
										<el-form-item label="" prop="weight">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">权重:</span>
											<el-input v-model="watchData.weight"></el-input>
										</el-form-item>
										<el-form-item label="" prop="material">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">材质:</span>
											<el-input v-model="watchData.material"></el-input>
										</el-form-item>
										
									</div>
									<!-- 第三列 -->
									<div class="addOne3">
										<el-form-item label="" prop="simpCode">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">拼音简码:</span>
											<el-input v-model="watchData.simpCode"></el-input>
											<!-- <span style="color: brown;">*</span> -->
										</el-form-item>
										<el-form-item label="" prop="ranges">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">适用范围:</span>
											<div class="double" style="display: flex;">
												<el-select v-model="watchData.ranges" placeholder="请选择">
												   <el-option v-for="item in AoeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
												</el-select>
											</div>
										</el-form-item>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="unitDoseNum">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">单位剂量:</span>
												<el-input v-model="unitDoseNum" style="width: 58px;" @input="unitDoseNumChangce"></el-input>
												<span class="star">*</span>
											</el-form-item>
											<el-form-item label="" prop="unitDose">
												<div class="double" style="display: flex;">
													<el-select v-model="watchData.unitDose" placeholder="请选择" @change="unitDoseChance">
													   <el-option v-for="item in oop1" :key="item.value" :label="item.title" :value="item.title">
														   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
														   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
													   </el-option>
													</el-select>
													<span class="star">*</span>
												</div>
											</el-form-item>
										</div>
										<div class="addRows duan" style="display: flex;">
											<el-form-item label="" prop="minDoseNum">
												<span style="width: 68px;font-size: 12px;font-weight: bold;">最小剂量:</span>
												<el-input v-model="minDoseNum" style="width: 58px;" @input="minDoseNumChangce"></el-input>
												<span class="star">*</span>
											</el-form-item>
											<el-form-item label="" prop="minDose">
												<div class="double" style="display: flex;">
													<el-select v-model="watchData.minDose" placeholder="请选择" @change="minDoseChance">
													   <el-option v-for="item in oop1" :key="item.value" :label="item.title" :value="item.title">
														   <span style="float: center; color: #8492a6; font-size: 12px;">编码：{{ item.id }}</span>
														   <span style="float: center; color: #8492a6; font-size: 12px;">名称：{{ item.title }}</span>
													   </el-option>
													</el-select>
													<span class="star">*</span>
												</div>
											</el-form-item>
										</div>
										<el-form-item label="" prop="qualityCategory">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">质量类别:</span>
											<el-select v-model="watchData.qualityCategory" placeholder="" @change="quiltyChange">
											   <el-option v-for="item in quiltyOptions" :key="item.value" :label="item.value" :value="item.value">
												   <span style="float: center; color: #8492a6; font-size: 12px;">{{ item.value }}</span>
											   </el-option>
											</el-select>
										</el-form-item>
										<el-form-item label="" prop="medicationFrequency">
											<span style="width: 88px;font-size: 12px;font-weight: bold;">默认用药频率:</span>
											<el-select v-model="watchData.medicationFrequency" placeholder="" @change="medicationFrequencyChange">
											   <el-option v-for="item in medicationFrequencyOptions" :key="item.value" :label="item.value" :value="item.value">
												   <span style="float: center; color: #8492a6; font-size: 12px;">{{ item.value }}</span>
											   </el-option>
											</el-select>
										</el-form-item>
										<el-form-item label="" prop="strengthCoefficient">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">强度系数:</span>
											<el-input v-model="watchData.strengthCoefficient"></el-input>
										</el-form-item>
										<el-form-item label="" prop="withdrawalDays">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">停药天数:</span>
											<el-input v-model="watchData.withdrawalDays"></el-input>
										</el-form-item>
										<el-form-item label="" prop="contentsName">
											<span style="width: 68px;font-size: 12px;font-weight: bold;">目录名称:</span>
											<el-input v-model="watchData.contentsName"></el-input>
										</el-form-item>
										<el-form-item label="" prop="limitQuantity">
											<span style="width: 88px;font-size: 12px;font-weight: bold;">门诊限制总量:</span>
											<el-input v-model="watchData.limitQuantity"></el-input>
										</el-form-item>
									</div>		
								</div>
									<div class="addOne4">
										<el-form-item label="" prop="limitDays">
											<span style="width: 88px;font-size: 12px;font-weight: bold;">门诊限制天数:</span>
											<el-input v-model="watchData.limitDays" style="width:137px;"></el-input>
										</el-form-item>
										<el-form-item label="" prop="remake">
											<span style="width: 88px;font-size: 12px;font-weight: bold;margin-left: 24px;">限定备注:</span>
											<el-input type="textarea" resize="none" :autosize="{ minRows: 1, maxRows: 1}" maxlength="50" placeholder="请输入内容" v-model="watchData.remake">
											</el-input>
										</el-form-item>
									</div>
								<!-- tble -->
								<el-form-item label="" prop="drugDosageForm">
									<div class="oneLineBox">
										<div style="display: flex;justify-content: space-between;list-style: none;">
											<span style="width: 72px;font-weight: bold;font-size: 12px;margin-left: 12px;">厂家信息:</span>
											<li><el-button v-for="(v,i) in boxaBtn" :key="i" :type="v.type" :icon="v.icon" size="medium" @click="boxaBtnHandClick(i)"></el-button></li>
										</div>
										<!-- table -->
										<el-table :data="EditManufacturerData" border align="center" style="width:788px;margin-left: 12px;" @row-click="rowClick">
										    <el-table-column fixed="left" label="行号" type="index" width="48"></el-table-column>
										    <el-table-column v-for="(col, inx) in SelectManufacturer" :key="inx" :type="col.type" :prop="col.prop" :label="col.name" :width="columnWidth(col, tableData)"></el-table-column>
										</el-table>
									</div>
								</el-form-item>
						  </el-form>
					  </div>
					  <span slot="footer" class="dialog-footer">
					    <el-button type="primary" @click="editNewData" size="mini" v-if="watch == '编辑西成药目录'">保存</el-button>
					    <el-button type="info" @click="editManufacturerDiglog = false" size="mini">关闭</el-button>
					  </span>
					</el-dialog>
				</div>
				
				<!-- table -->
				<div class="table">
					<el-table :data="tableData" border @row-dblclick="handledbRow">
						<el-table-column v-for="(col, inx) in tableRows" :key="inx" :type="col.type" :prop="col.prop" :label="col.name" :width="columnWidth(col, tableData)"></el-table-column>
						<!-- fixed -->
						<el-table-column fixed="left" label="行号" type="index" width="50"></el-table-column>
						<!-- edit -->
						<el-table-column fixed="right" label="操作" width="88">
						  <template slot-scope="scope">
							  <div class="editbox" style="text-align: center;">
								<el-button type="text" @click="editFormValue(scope.row)" size="mini">编辑</el-button>
								<el-button type="text" @click="handleDelete(scope.row.id)" size="mini">删除</el-button>
							  </div>
						  </template>
						</el-table-column>
					</el-table>
				</div>
				<!-- 分页 -->
				<el-pagination
				@size-change="handleSizeChange"
				@current-change="handleCurrentChange"
				:current-page="pageNum"
				:page-sizes="[5, 10, 20]"
				:page-size="pageSize"
				:total="totalSize"
				layout="total, sizes, prev, pager, next, jumper"
				background
				>
				</el-pagination>
			</div>
		</div>
		<!-- feet -->
		<div class="feet">
			<!-- 厂家模态框 -->
			<div class="sonPriceDiglog">
				<el-dialog
				  :title="editMTitle"
				  :visible.sync="addManufacturerDiglog"
				  width="520px"
				  :before-close="handleClose">				
				  <el-form :model="listCharge" :inline="true" size="mini">
					  
					<el-form-item label="" prop="manufacturerName" :disabled="editdisabled">
						<div style="display: flex;">
							<span style="font-size: 12px;font-weight: bold;margin-left: 12px;">厂家名称:</span>
							<span style="color: brown;margin-right: 8px;">*</span>
							<el-select @change="handClickManufacturerName" v-model="listCharge.manufacturerName" filterable placeholder="" remote @focus="focusManufact"
							  reserve-keyword :remote-method="remoteManufacturerMethod" popper-class="selectManufacturerFrom" v-selectScroll="handleManufacturerScroll"
							  :disabled="Namedisabled"
							  >
							    <el-option
							      v-for="(item,index) in SelectmanufacturerName"
							      :key="item.id"
							      :label="item.manufacturerName"
							      :value="item">
								  <!-- 选择框 -->
								  <div class="abox">
									  <!-- <span class="fixedData">序号：</span><span class="Adata">{{ index + 1 }}</span> -->
									  <!-- 文字提示 -->
									  <span class="fixedData">编码：</span>
									  <el-tooltip :content="item.coding" placement="top">
									    <span class="Adata">{{ item.coding }}</span>
									  </el-tooltip>
									  <!-- 文字提示 -->
									  <span class="fixedData">名称：</span>
									  <el-tooltip :content="item.manufacturerName" placement="top">
									    <span class="Adata">{{ item.manufacturerName }}</span>
									  </el-tooltip>
									  <!-- 文字提示 -->
									  <span class="fixedData">产地：</span>
									  <el-tooltip :content="item.origin" placement="top">
									    <span class="Adata">{{ item.origin }}</span>
									  </el-tooltip>
									 
								  </div>
							    </el-option>
								<!-- 加载提示 -->
								 <span v-if="showLoading == true" v-loading="loading" style="font-size: 10px;display: inline-block;width: 100%;text-align: center;">{{ titSpell }}</span>
							  </el-select>
						</div>
					</el-form-item>
					
					<div class="addManufacturer">
						<div class="addManufacturerL">
							<el-form-item label="" prop="status">
								<div class="elfbox">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">有效状态:</span>
									<el-select v-model="listCharge.status" placeholder="请选择" style="margin-left: 18px;">
									   <el-option v-for="item in effectiveStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</div>
							</el-form-item>
							<el-form-item label="" prop="approvalNumber">
								<div class="elfbox">
									<span style="width: 88px;font-size: 12px;font-weight: bold;">批准文号:</span>
									<el-input v-model="listCharge.approvalNumber" style="width:137px;margin-left: 18px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="localDrugs">
								<div class="elfbox">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">本地药品:</span>
									<el-select v-model="listCharge.localDrugs" placeholder="请选择" style="margin-left: 18px;">
									   <el-option v-for="item in basicOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</div>
							</el-form-item>
							<el-form-item label="" prop="barCode">
								<div class="elfbox">
									<span style="width: 88px;font-size: 12px;font-weight: bold;">条码值:</span>
									<el-input v-model="listCharge.barCode" style="width:137px;margin-left: 28px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="origin">
								<div class="elfbox">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">产地:</span>
									<el-select v-model="listCharge.origin" placeholder="请选择" style="margin-left: 48px;">
									   <el-option v-for="item in originOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</div>
							</el-form-item>
							<el-form-item label="" prop="gather">
								<div class="elfbox">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">集采中选:</span>
									<el-select v-model="listCharge.gather" placeholder="请选择" style="margin-left: 18px;">
										<el-option v-for="item in gatherOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</div>
							</el-form-item>
							<el-form-item label="" prop="standardizationName">
								<div class="elfbox">
									<span style="width: 88px;font-size: 12px;font-weight: bold;">国家贯标名称:</span>
									<el-input v-model="listCharge.standardizationName" style="width:137px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="ypId">
								<div class="elfbox">
									<span style="width: 88px;font-size: 12px;font-weight: bold;">YPID:</span>
									<el-input v-model="listCharge.ypId" style="width:137px;"></el-input>
								</div>
							</el-form-item>
						</div>
						<!-- right -->
						<div class="addManufacturerR">
							<el-form-item label="" prop="registeredTrademark">
								<div class="elfbox">
									<span style="font-size: 12px;font-weight: bold;">注册商标:</span>
									<el-input v-model="listCharge.registeredTrademark" style="width:137px;margin-left: 18px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="ratio">
								<div class="elfbox">
									<span style="font-size: 12px;font-weight: bold;">自付比例:</span>
									<el-input v-model="listCharge.ratio" style="width:137px;margin-left: 18px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="bidLevel">
								<div class="elfbox">
									<span style="width: 68px;font-size: 12px;font-weight: bold;">中标等级:</span>
									<el-select v-model="listCharge.bidLevel" placeholder="请选择">
									   <el-option v-for="item in bidLevelOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</div>
							</el-form-item>
							<el-form-item label="" prop="bidNum">
								<div class="elfbox">
									<span style="font-size: 12px;font-weight: bold;">中标次数:</span>
									<el-input v-model="listCharge.bidNum" style="width:137px;margin-left: 18px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="drugCode">
								<div class="elfbox">
									<span style="font-size: 12px;font-weight: bold;">药品本位码:</span>
									<el-input v-model="listCharge.drugCode" style="width:137px;margin-left: 28px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="onlineCode">
								<div class="elfbox">
									<span style="font-size: 12px;font-weight: bold;">网采编码:</span>
									<el-input v-model="listCharge.onlineCode" style="width:137px;margin-left: 28px;"></el-input>
								</div>
							</el-form-item>
							<el-form-item label="" prop="standardizationCode">
								<div class="elfbox">
									<span style="font-size: 12px;font-weight: bold;">国家贯标码:</span>
									<el-input v-model="listCharge.standardizationCode" style="width:137px;margin-left: 28px;"></el-input>
								</div>
							</el-form-item>
						</div>
					</div>
					<el-form-item label="" prop="remake">
						<span style="width: 88px;font-size: 12px;font-weight: bold;margin-left: 24px;">备注:</span>
						<el-input type="textarea" resize="none" :autosize="{ minRows: 1, maxRows: 1}" maxlength="50" placeholder="请输入内容" v-model="listCharge.remake">
						</el-input>
					</el-form-item>
				  </el-form>
				  <span slot="footer" class="dialog-footer">
				    <div class="footerbox" style="display: flex;justify-content: space-between;">
						<div><span style="font-size: 12px;color: #5b5b5b;:2px;font-weight: bold;">连续新增:</span>
							<el-checkbox v-model="firstLoading"></el-checkbox>
						</div>
						<div>
							<el-button @click="addManufacturer" size="mini">确定</el-button>
							<el-button @click="addManufacturerDiglog = false" size="mini">取消</el-button>
						</div>
					</div>
				  </span>
				</el-dialog>
			</div>
			
		</div>

	</div>
</template>

<script>
	// selfs / js
	import Chinese from "../../../external/PY.js";
	import Pinyin from "../../../external/pinyin.js";
	import MedicenCata from '../../../external/MedicenCata.js'
	import minUnit from '../../../external/minUnit.js'
	import unitDose from '../../../external/unitDose.js'
	// 接口
	import { 
		AllTree,getTreeData,
		getDrugInformation,
		selectByDrugCatalogue,addDrugInformation,updateDrugInformation,
		getManufacturer,getDrugManufacturer
	 } 
	from "../../../api/systemCatalogue/MedicenCata.js";
	
	export default {
		components: {
			MedicenCata,minUnit,unitDose
		},
		data() {
			return {
				defaultProps: {
					children: 'children',
					label: 'label'
				},
				// str
				searchValue:'',
				iconHandleClick:'el-icon-plus',
				CatalogueName:'',
				watch:'',
				editMTitle:'新增厂家信息',
				DropDownedName:'可用',
				iconComes:'el-icon-xy',
				titSpell:'我是有底线的~',
				minDoseNum:'', //最小剂量 --> 拼接
				unitDoseNum:'', //单位剂量 --> 拼接
				toPinyin:'',
				// boolean
				OrNot:true, //是否可选
				isAntiBiot:false, //抗生素否
				isSkinTest:false, //皮试否
				disabled:true,
				loading:false,
				sonPriceDiglog:true,  //子菜单添加
				addManufacturerDiglog:false,  //子菜单添加 ==> 厂家
				editManufacturerDiglog:false,  //子菜单编辑 ==> 厂家
				dialogVisible:false,
				Namedisabled:false,
				disabledInput:true,
				editdisabled:true,
				addDialogVisible:false,  //此乃新增控制
				firstLoading:false, //默认加载
				showLoading:false,
				// number
				dataIndex: 0,
				indexTime:0,
				pageNum: 1, //当前页currentPage
				pageSize: 5,
				totalSize: 10, //总条数
				// arr
				data: [],
				editform: [],
				oop:[],
				oop1:[],
				taboo: [],
				watchData: [],
				SelectName: [],
				SelectmanufacturerName: [],
				bidLevelOptions:[{ id:1,label:'国标',value:'国标'},{ id:2,label:'省标',value:'省标'},{ id:3,label:'市标',value:'市标'}], //中标等级
				gatherOptions:[{ id:1,label:'中选',value:'中选'},{ id:2,label:'非中选',value:'非中选'}], //集采中选
				originOptions:[{ id:1,label:'国产',value:'国产'},{ id:2,label:'进口',value:'进口'},{ id:3,label:'省内',value:'省内'}], //产地
				YNOptions:[{ id:1,label:'是',value:1},{ id:2,label:'否',value:2}], //是否
				basicOptions:[{ id:1,label:'是',value:'是'},{ id:2,label:'否',value:'否'}], //基本药物
				options:[{ id:1,label:'全院',value:'全院'},{ id:2,label:'门诊',value:'门诊'}], // 适用范围
				effectiveStatusOptions:[{ id:1,label:'可用',value:'可用'},{ id:2,label:'禁用',value:'禁用'}], //有效状态
				quiltyOptions:[{ id:1,label:'一类',value:'一类'},{ id:2,label:'二类',value:'二类'},{ id:3,label:'三类',value:'三类'}], //质量类别
				basicTypeOptions:[{ id:1,label:'国家基药',value:'国家基药'},{ id:2,label:'省级基药',value:'省级基药'},{ id:3,label:'地区基药',value:'地区基药'}], //基药类型
				AoeOptions:[{ id:1,label:'全院',value:'全院'},{ id:2,label:'门诊',value:'门诊'},{ id:3,label:'住院',value:'住院'},{ id:4,label:'其他',value:'其他'}],
				weightTypeOptions:[{ id:1,label:'普价',value:'普价'},{ id:2,label:'贵重',value:'贵重'},{ id:3,label:'昂贵',value:'昂贵'},{ id:4,label:'免费',value:'免费'}], //贵重类型
				medicationMethodOptions:[{ id:1,label:'口服',value:'口服'},{ id:2,label:'皮试',value:'皮试'}],//默认给药方式
				medicationFrequencyOptions:[{ id:1,label:'一日一次',value:'一日一次'},{ id:2,label:'一日三次',value:'一日三次'}],//默认用药频率
				storageConditionsOptions:[{ id:1,label:'常温(0~30°)',value:'常温(0~30°)'},{ id:2,label:'阴凉(2~20°)',value:'阴凉(2~20°)'},{ id:3,label:'冷藏(2~8°)',value:'冷藏(2~8°)'},{ id:2,label:'凉暗(2~20°且避光)',value:'凉暗(2~20°且避光)'}],//储存条件
				tableData1: [
					{ num:'1', code:'56', label: '‌肠溶软胶囊', status: '可用', nz: '否',operatingTime:'2024-12-08 10：36：42',operator:'天命人',remark:'服用后75秒内，获得10%伤害减免。' },	
				],
				boxaBtn:[{ add:"add", title:"", type:"text", icon:"el-icon-plus" },{ adit:"adit", title:"", type:"text", icon:"el-icon-edit" }, { del:"del", title:"", type:"text", icon:"el-icon-delete" }],
				
				// title右侧按钮
				headerBtn:[
				 // { back:"back", title:"返回", type:"primary" },
				 { refesh:"refesh", title:"刷新", type:"", icon:"el-icon-refresh" },
				 { senior:"senior", title:"高级", type:"", icon:"" },
				 { add:"add", title:"新增", type:"warning" },
				],
				//obj
				listCharge:{
					manufacturerName:'',//厂家名称
					approvalNumber:'',//批准文号
					barCode: "",//条值码
					bidLevel: "",//中标等级
					bidNum: "",//中标次数
					drugCode: "",//药品本位码
					drugId: 0,//药品id
					gather: "",//采集中选
					institution: "机构1",//机构
					insuranceCode: "保险编码1",//保险编码
					localDrugs: "",//本地药品
					manufacturerId: "",//生产厂家Id
					onlineCode: "",//网采编码
					operatingPeople: "",//操作人
					operatingTime: "",//操作时间
					origin: "",//产地
					ratio: "",//自费比列
					registeredModel: "",//注册型号
					registeredSpecifications: "",//注册规格
					registeredTrademark: "",//注册商标
					remake: "",//备注
					standardizationCode: "",//贯标码
					standardizationName: "",//贯标名称
					status: "",//状态
					ypId: "",//YPID
				},
				addForm: {
					pharmacopoeiaId:'',
					operator:'',//操作人
					drugName:'', //药品名称
				 	drugDosageForm: "", //药品剂型
				 	isAntiBiot: "", //是否抗生素
					isSkinTest: "", //是否皮试
					coding:"", //编码
				 	drugType: "", //药品类型
				 	simpCode: "", //拼音简码
				 	drugAlias: "", //药品别名
				 	aliasSimpCode: "", //别名简码
				 	ranges: "", //适用范围
				 	drugSpecifications: "", //药品规格
					unitDose: "", //单位剂量
					unitDoseNum:'', // 单位剂量 -> 拼接
					packingUnit: "", //包装单位
					packingNum:"", //包装数量
					packageSpecifications:'',//包装规格
				 	minUnit: "",//最小单位
				 	minDose: "",//最小剂量
				 	basicDrug: "",//基本药物
				 	basicType: "",//基药类型
				 	isProtect: "",//避光药品
				 	qualityCategory: "",//质量类别
				 	weightType: "",//贵重类型
				 	medicationMethod: "",//默认给药方式
				 	medicationFrequency: "",//默认用药频率
				 	dddvalue: "", //DDD
				 	sourceClassification: "",//来源分类
				 	strengthCoefficient: "",//强度系数
				 	limitMedication: "",//限量用药
					effectiveStatus: "",//有效状态
					withdrawalDays: "",//停药天数
					dissolvingMeasure: "",//溶媒量
					weight: "",//权重
					contentsName: "",//目录名称
					storageConditions: "",//储存条件
					material: "",//材质
					limitQuantity: "",//门诊限制总量
					limitDays: "",//门诊限制天数
				 	remake: "",//限定备注
					maps:[],
					// addManuTable:[],//多个厂家
				},
				editForm:{},
				addFormRules:{
					coding:[{ required: true, message: "此项为必填", trigger: "blur" }],
					packingUnit:[{ required: true, message: "包装单位为必填！！", trigger: "blur" }],
					drugSpecifications:[ { required:true,message:'药品规格为必填！！！',trigger:'blur' }],
					unitDose:[{ required: true, message: "单位剂量为必填", trigger: "blur" },{ pattern:/^[a-zA-Z0-9]+$/, message: '单位剂量各格式应为数字加英文！', trigger: 'blur' }],
					minDose: [{ required: true, message: "最小剂量为必填！！", trigger: "blur" },{ pattern:/^[a-zA-Z0-9]+$/, message: '最小剂量各格式应为数字加英文！', trigger: 'blur' },],
					packingNum: [{ required: true, message: "包装数量为必填！！", trigger: "blur" },{ pattern:/^[a-zA-Z0-9]+$/, message: '包装数量各格式应为数字加英文！', trigger: 'blur' },],
					// 数字
					dddvalue: [{ pattern:/^\d+$|^\d*\.\d+$/, message: 'ddd值应为数字或小数！', trigger: 'blur' }],
					dissolvingMeasure: [{ pattern:/^\d+$|^\d*\.\d+$/, message: '溶媒量应为数字或小数！', trigger: 'blur' }],
					limitDays: [{ pattern:/^[1-9]\d*$/, message: '门诊限制天数应为正整数！', trigger: 'blur' }],
					withdrawalDays: [{ pattern:/^[1-9]\d*$/, message: '停药天数应为正整数！', trigger: 'blur' }],
					strengthCoefficient: [{ pattern:/^\d+$|^\d*\.\d+$/, message: '强度系数应为数字或小数！', trigger: 'blur' }],
					limitQuantity: [{ pattern:/^\d+$|^\d*\.\d+$/, message: '总量应为数字或小数！', trigger: 'blur' }],
				},
				// title右侧按钮
				tableRows:[
					{ name:"系统序号", prop:"id", type:"" },{ name:"编码", prop:"coding", type:"" },{ name:"药典名称", prop:"drugName", type:"" },
					{ name:"生产厂家", prop:"manufacturerName", type:"" },{ name:"别名", prop:"drugAlias", type:"" },{ name:"药品规格", prop:"drugSpecifications", type:"" },
					{ name:"包装规格", prop:"packageSpecifications", type:"" },{ name:"包装单位", prop:"packingUnit", type:"" },{ name:"包装数量", prop:"packingNum", type:"" },
					{ name:"计量单位", prop:"unitDose", type:"" },{ name:"药品剂型", prop:"drugDosageForm", type:"" },
					{ name:"药品类型", prop:"drugType", type:"" },{ name:"贵重类型", prop:"weightType", type:"" },
					{ name:"操作时间", prop:"operationTime", type:"" },{ name:"操作人", prop:"operator", type:"" },{ name:"有效状态", prop:"effectiveStatus", type:"" },
					{ name:"备注", prop:"remake", type:"" },{ name:"隶属机构", prop:"institution", type:"" },
					{ name:"基本药性", prop:"basicDrug", type:"" },{ name:"国家贯标码", prop:"standardizationCode", type:"" },{ name:"国家贯标名称", prop:"standardizationName", type:"" },
					{ name:"YPID", prop:"ypid", type:"" }
				],
				SelectManufacturer:[
					{ name:"生产厂家", prop:"manufacturerName", type:"" },{ name:"保险编码", prop:"insuranceCode", type:"" },{ name:"保险类", prop:"coding", type:"" },{ name:"药典名称", prop:"pharmacopoeiaName", type:"" },
					{ name:"产地", prop:"origin", type:"" },{ name:"注册商", prop:"registeredTrademark", type:"" },{ name:"批准文号", prop:"approvalNumber", type:"" },
					{ name:"生产厂", prop:"packageSpecifications", type:"" },{ name:"自付比例", prop:"ratio", type:"" },{ name:"本地药品", prop:"localDrugs", type:"" },
					{ name:"中标等级", prop:"bidLevel", type:"" },{ name:"中标次数", prop:"bidNum", type:"" },
					{ name:"条码值", prop:"barCode", type:"" },{ name:"备注", prop:"remake", type:"" },{ name:"有效状态", prop:"status", type:"" },{ name:"国家贯标名称", prop:"standardizationName", type:"" },
					{ name:"国家贯标码", prop:"standardizationCode", type:"" },{ name:"药品本位码", prop:"drugCode", type:"" },{ name:"集采中选", prop:"gather", type:"" },
					{ name:"网采编码", prop:"institution", type:"" },{ name:"YPID", prop:"ypid", type:"" }
				],
				// 模拟生产厂家
				ManufacturerData:[],
				EditManufacturerData:[],//编辑生产厂家
				tableData: [
					{ num:'1', code:'X0000001164', name: '尼可刹米注射液', type:'西药', jix:'注射剂', dum:'普通药',yt:'非液体',lc:'', kinds:'神经系统用药', sonKinds:'中枢神经兴奋药',IIIkinds:'', ATC:'否', TATC:'否', OTC:'否', TEat:'否', date: '2024-11-26 21：30：22', Opter:'admin', zt: '可用', nz: '否',yn:'否',ps:'否',js:'否',zl:'否',rs:'否',priceKinds:'西药费',jk:'否',db:'否',dangerous:'非高危药品',remark:' ' },
					{ num:'2', code:'X0000001165', name: '注射用重组人白介素_2（123ALA）', type:'西药', jix:'注射剂',yt:'非液体',lc:'', dum:'普通药', kinds:'血液系统用药', sonKinds:'升血细胞药',IIIkinds:'升血小板药', ATC:'否', TATC:'否', OTC:'否', TEat:'否', date: '2024-11-02 08：28：02', Opter:'杨勇', zt: '可用', nz: '否',yn:'否',ps:'否',js:'否',zl:'否',rs:'否',priceKinds:'西药费',jk:'否',db:'否',dangerous:'非高危药品',remark:' ' },
					{ num:'3', code:'X0000001166', name: '复方泛影葡胺注射液', type:'西药', jix:'注射剂', dum:'普通药',yt:'非液体',lc:'', kinds:'医学影像对比例', sonKinds:'X线与CT对比剂',IIIkinds:'心、血管造影与血管内给药增强对比剂', ATC:'否', TATC:'否', OTC:'否', TEat:'否', date: '2024-11-16 21：20：12', Opter:'黄丹', zt: '可用', nz: '否',yn:'否',ps:'否',js:'否',zl:'否',rs:'否',priceKinds:'西药费',jk:'否',db:'否',dangerous:'B级高危',remark:' ' },
					{ num:'4', code:'X0000001167', name: '重组人生长激素注射液', type:'西药', jix:'注射剂', dum:'普通药',yt:'非液体',lc:'', kinds:'内分泌系统用药', sonKinds:'下丘脑-垂体激素与相关药物',IIIkinds:'生长激素', ATC:'0', TATC:'否', OTC:'否', TEat:'否', date: '2024-11-20 21：10：24', Opter:'古永', zt: '可用', nz: '否',yn:'否',ps:'否',js:'否',zl:'否',rs:'否',priceKinds:'西药费',jk:'否',db:'否',dangerous:'非高危药品',remark:' ' },
					{ num:'5', code:'X0000001168', name: '奥卡西平片', type:'西药', jix:'片剂', dum:'普通药',yt:'非液体',lc:'', kinds:'神经系统用药', sonKinds:'抗癫痫药与抗惊厥药',IIIkinds:'', ATC:'0', TATC:'否', OTC:'否', TEat:'否', date: '2024-11-20 21：10：24', Opter:'古永', zt: '可用', nz: '否',yn:'否',ps:'否',js:'否',zl:'否',rs:'否',priceKinds:'西药费',jk:'否',db:'否',dangerous:'非高危药品',remark:' ' },
					{ num:'6', code:'X0000001169', name: '牛碱性成纤维细胞生长因子滴眼液', type:'西药', jix:'滴眼剂', dum:'普通药',yt:'非液体',lc:'', kinds:'生物制品', sonKinds:'细胞因子',IIIkinds:'', ATC:'0', TATC:'否', OTC:'否', TEat:'否', date: '2024-11-20 21：10：24', Opter:'古永', zt: '可用', nz: '否',yn:'否',ps:'否',js:'否',zl:'否',rs:'否',priceKinds:'西药费',jk:'否',db:'否',dangerous:'非高危药品',remark:' ' },
				],
			};
		},
		mounted() {
			// 模拟信息
			this.oop = minUnit.map(function(v) {
				return v
			})
			this.oop1 = unitDose.map(function(v) {
				return v
			})
			this.userInfo = JSON.parse(localStorage.getItem('userInfo'));
			this.addForm.operator = this.userInfo.userName
			this.listCharge.operator = this.userInfo.userName
			this.dataIndex ++
			this.treeMenu();
			this.loadData();
		},
		methods: {
			/*
				数据源
			*/
			async loadData(){
				let res = await getDrugInformation({
					strs: this.CatalogueName,
					drugName: this.searchValue,
					effectiveStatus:'',
					pageNum: this.pageNum,
					pageSize: this.pageSize
				})
				if(res.code === 404){
					// this.$message({
					//   type: 'info',
					//   message: res.message
					// });
					this.loading = false;//关闭加载
					this.tableData = [];//null
					this.isShowNewAdd = true//打开新增提示
				}else{
					// 赋值给Options
					this.tableData = res.data.content;
					this.CodeNumber = res.data.content.length
					// console.log(this.CodeNumber);
				}
			},
			//  模糊搜索接口函数
			async getData(){
				let res = await selectByDrugCatalogue({
					name: this.GenericName,
					pageNum: this.pageNum,
					pageSize: this.pageSize
				})
				console.log(res);
				if(res.code === 404){
						this.$message({
						  type: 'info',
						  message: res.message
						});
						this.loading = false;//关闭加载
						this.SelectName = [];//null
						this.isShowNewAdd = true//打开新增提示
				}else{
					// 赋值给Options
					this.SelectName = res.data
					// 保存当前页条数
					this.pageSizeSave += res.data.length
					// console.log(this.pageSizeSave);
					// 拿到总条数！
					this.totalSize = res.data.totalSize
					this.loading = false;
				}
			},
			//  模糊搜索接口函数 ==> 厂家
			async getDataM(){
				let res = await getManufacturer({
					manufacturerName: this.listCharge.manufacturerName,
					pageNum: this.pageNum,
					pageSize: this.pageSize
				})
				if(res.code === 404){
					this.$message({
					  type: 'info',
					  message: res.message
					});
					this.loading = false;//关闭加载
					this.SelectmanufacturerName = [];//null
					this.isShowNewAdd = true//打开新增提示
				}else{
					// 赋值给Options
					this.SelectmanufacturerName = res.data.content
					console.log(this.SelectmanufacturerName);
					// 保存当前页条数
					this.pageSizeSave += res.data.length
					// console.log(this.pageSizeSave);
					// 拿到总条数！
					this.totalSize = res.data.totalSize
					this.loading = false;
				}
			},
			/*
				about tree
			*/
			async handleNodeClick(data,e) {
				this.CatalogueName = data.label
				this.iconComes = 'el-icon-' + this.makePy(data.label)
				// console.log(this.CatalogueName);
				let rs = await getTreeData({
					strs: this.CatalogueName,
					drugName: this.searchValue,
					effectiveStatus:'',
					pageNum: this.pageNum,
					pageSize: this.pageSize
				})
				if(rs.code == 404){
					//验证失败
					this.$message({
					message:'fail！',
					type:"info"
					});
					this.tableData = [];
				}else{
					this.tableData = rs.data.content
				}
				// this.loadData();
				// if(data != ''){
				// 	// this.treeMenu();
				// 	console.log(111111);
				// }else{
				// 	console.log(222222);
				// }
			},
			async treeMenu(){
				let rs = await AllTree({})
				let treeTopMenu = rs.data
				if(this.dataIndex == 1){
					// this.data.push(...treeTopMenu)
					this.data = treeTopMenu
					// console.log(this.data,'treeMenu');
				}else{
					this.data = this.data
				}
			},
			
			/*
				about input
			*/
			// 输入或扫码框触发事件
			 remoteMethod(query) {
				console.log(query);
				this.GenericName = query;
				this.loading = true
				// 清除之前的定时器
					if (this.timerId) {
						clearTimeout(this.timerId);
					}
				  // 设置新的定时器
					this.timerId = setTimeout(() => {
					  // 每隔一段时间执行逻辑
						// console.log(this.GenericName);
						this.loading = true
						if(/\s/g.test(this.GenericName) == true ){
							this.$alert('值不能为空格，请重试！','提示', {
								confirmButtonText: '确定',
								type: 'warning',
							});
							this.loading = false;
						}else{
							// console.log('没空格走接口');
							// this.loading = true
							this.getData()
						}
					  // 清除定时器
					  this.timerId = null;
					}, 1500); // 间隔时间
			},
			// 输入或扫码框触发事件 ==> 厂家
			 remoteManufacturerMethod(query) {
				console.log(query);
				this.manufacturerName = query;
				this.loading = true
				// 清除之前的定时器
					if (this.timerId) {
						clearTimeout(this.timerId);
					}
				  // 设置新的定时器
					this.timerId = setTimeout(() => {
					  // 每隔一段时间执行逻辑
						// console.log(this.GenericName);
						this.loading = true
						if(/\s/g.test(this.GenericName) == true ){
							this.$alert('值不能为空格，请重试！','提示', {
								confirmButtonText: '确定',
								type: 'warning',
							});
							this.loading = false;
						}else{
							// console.log('没空格走接口');
							// this.loading = true
							this.getDataM();
						}
					  // 清除定时器
					  this.timerId = null;
					}, 1500); // 间隔时间
			},
			//焦点获取
			foucshandClickName(){
				this.getData();
			},

			// input
			drugAliasInput(val){
				this.addForm.drugAlias = val;
				this.addForm.aliasSimpCode = this.makePy(this.addForm.drugAlias).toUpperCase();
				this.watchData.aliasSimpCode = this.makePy(this.watchData.drugAlias).toUpperCase();
				this.watchData.simpCode = this.makePy(this.watchData.drugName).toUpperCase();
			},
			/*
				about table
			*/
		   // col 里面包含了表头字段和名称，list 是表格数据
		    columnWidth(col, list) {
		         let prop = col.prop,lab = col.lab;
		         let width = 40; // 设定一个最小值
		         let maxlenStr = ""; // 最长字符串
		         for (let info of list) {
		           if (maxlenStr < (info[prop] + "").length) maxlenStr = info[prop];
		         }
		         width = Math.max(width, len(lab), len(maxlenStr));
		         // 表格自带的内边距(20px) 自调
		         return width + 12; // 这里加了 12px
		         function len(str) {
		           // 实际分配长度可根据需要自行调整
		           let length = 0;
		           for (const char of str + "") {
		             // 英文小写字符 8px
		             if ("a" <= char && char <= "z") length += 8;
		             // 英文大写字符 12px
		             else if ("A" <= char && char <= "Z") length += 12;
		             // 中文字符 16px
		             else if (char >= "\u4e00" && char <= "\u9fa5") length += 30;
		             // 其他 8px
		             else length += 8;
		           }
		           return length;
		         }
		       },
			// edit
			async dirtLoadata(){
				let res = await getDrugManufacturer({
					id:this.watchData.id
				})
				this.EditManufacturerData = res.data
				console.log(this.EditManufacturerData);
				this.watchData.maps = this.EditManufacturerData
			},

			// db events
			handledbRow(row, column, event){
				if(row){ 
					console.log(row,'双击过后编辑');
					this.watchData = row;
					this.editManufacturerDiglog = true;
					this.watch='新增西成药目录';
					this.editdisabled=true;
					this.tableRows = this.ManufacturerData;
				 } else { console.log('fail'); }
				console.log(this.watchData);
				// this.toPinyin = Chinese(this.watchData.name)
				// console.log(this.toPinyin);
			},
			//新增西成药目录提交
			addNewData(){
				//触发验证表单
				this.$refs.addForm.validate(async(valid) => {
				  if(valid){
				    //验证通过
					this.addForm.maps = this.ManufacturerData;
					this.addForm.unitDose = this.unitDoseNum + this.addForm.unitDose //单位剂量
					this.addForm.minDose = this.minDoseNum + this.addForm.minDose //最小剂量
					this.isSkinTest == true ? this.addForm.isSkinTest = '是' : this.addForm.isSkinTest = '否' //皮试
					this.isAntiBiot == true ? this.addForm.isAntiBiot = '是' : this.addForm.isAntiBiot = '否' //抗生素
					console.log(this.addForm);
				    let rs = await addDrugInformation(this.addForm)
					  if (rs.code === 200){
					  this.$message({
					  message:'西成药目录新建成功！',
					  type:"success"
					  });
					  this.addManufacturerDiglog = false;
					  this.addDialogVisible = false;
					  this.loading = false;
					  this.loadData();//数据重新渲染
					  }else{
						//验证失败
						this.$message({
						message:'fail！',
						type:"info"
						});
					  }
					}
				});
			},
			//编辑西成药目录完成
			async editNewData(row){
				console.log(this.watchData,'编辑诡异提交');
				let rs = await updateDrugInformation(this.watchData);
				let { code,message } = rs;
				if (code === 200) {
					this.$message({
						type: 'success',
						message: '修改成功！',
					});
					this.loadData(); //更新驱动
					this.dialogVisible = false;
				} else {
					this.$message.error('失败！')
				}
			},
			/**
			 * 选择值  --->
			 */
			// ---> 基本药物
			basicChance(val){
				val == '是' ? this.OrNot = false : this.OrNot = true
			},
			// ---> 单位剂量 Input
			unitDoseNumChangce(val){
				// this.addForm.unitDoseNum = val
			},
			// ---> 单位剂量
			unitDoseChance(val){
				// this.addForm.unitDose = val
			},
			// ---> 贵重类型
			weightTypeChange(val){
				// this.addForm.weightType = val
			},
			// ---> 最小剂量 Input
			minDoseNumChangce(val){
				// this.minDoseNum = val
			},
			// ---> 最小剂量
			minDoseChance(val){
				// this.addForm.minDose = val
			},
			// ---> 质量类别
			quiltyChange(val){
				// this.addForm.qualityCategory = val
			},
			// ---> 默认给药方式
			medicationMethodChange(val){
				// this.addForm.medicationMethod = val
			},
			// ---> 默认用药频率
			medicationFrequencyChange(val){
				// this.addForm.medicationFrequency = val
			},
			// ---> 限量用药
			limitMedicationChange(val){
				// this.addForm.limitMedication = val
			},

			// ---> 储存条件
			storageConditionsChange(val){
				// this.addForm.storageConditions = val
			},
			// ---> 抗生素否
			isAntiBiotChange(val){},
			// ---> 皮试否
			isSkinTestChange(val){},
			// 模糊搜索选择 ==> 新增
			handClickName(val){
				// console.log(val);
				this.addForm.pharmacopoeiaId = val.id
				this.addForm.drugName = val.genericName //通用名赋值
				this.addForm.drugDosageForm = val.drugDosage  //剂型赋值
				this.addForm.drugType = val.drugType //类型赋值
				this.addForm.coding = val.code //编码赋值
				this.addForm.simpCode = this.makePy(val.genericName).toUpperCase()
			},
			
			editHandClickName(val){
				// console.log(val);
				this.watch.drugName = val.genericName //通用名赋值
				this.watch.drugDosageForm = val.drugDosage  //剂型赋值
				this.watch.drugType = val.drugType //类型赋值
				this.watch.coding = val.code //编码赋值
				this.watch.simpCode = this.makePy(val.genericName).toUpperCase()
			},
			handClickManufacturerName(val){
				console.log(val);
				this.listCharge.manufacturerId = val.id //通用名赋值
				this.listCharge.manufacturerName = val.manufacturerName //生产厂家赋值
			},
			// close
			handleClose(done) {
				this.$confirm('确认关闭？')
				  .then(_ => {
					
					done();
				  })
				  .catch(_ => {
					
				  });
			},
			//新增表格厂家信息	// let obj = {...this.listCharg}
			addManufacturer(){
				if(this.editMTitle == '新增厂家信息'){
					this.ManufacturerData.push(JSON.parse(JSON.stringify(this.listCharge)));
					this.addManufacturerDiglog = false;
					// console.log(this.ManufacturerData,'新增厂家9999');
				}else{
					this.editManufacturer();
				}
			// 	
			},
			
			/*
			EDIT
			*/ 
			rowClick(row, column, event){
				console.log(row,event,'单机事件');
				this.listCharge = row;
				this.editMTitle = '编辑厂家信息';
				this.addManufacturerDiglog = true;
				this.Namedisabled = true;
			},
			editFormValue(row){
				// console.log(row);
				this.watch = '编辑西成药目录';
				this.watchData = row;
				this.watchData.simpCode = this.makePy(this.watchData.drugName).toUpperCase()
				this.watchData.aliasSimpCode = this.makePy(this.watchData.drugAlias).toUpperCase()
				this.unitDoseNum = this.watchData.unitDose.slice(0,1)
				this.minDoseNum = this.watchData.minDose.slice(0,1)
				this.editdisabled = false; //取消禁用并赋值
				this.editManufacturerDiglog = true;
				this.dirtLoadata();
				this.watchData.maps = this.EditManufacturerData
				console.log(this.watchData,'点击编辑过后');
			},
			//编辑表格厂家信息完成按钮	// let obj = {...this.listCharg}
			editManufacturer(){
				// console.log('编辑厂家信息事件');
				this.sonPriceDiglog = false;
				this.addManufacturerDiglog = false;
				// this.watchData.maps.push(JSON.parse(JSON.stringify(this.listCharge)));
				console.log(this.watchData);
			},
			// son btn events
			boxaBtnHandClick(i){
				// i event
				switch (i) {
					case 0:
						// 处理索引0的逻辑
						this.addManufacturerDiglog = true;
						this.editMTitle = '新增厂家信息';
						this.listCharge = {};
						this.Namedisabled = false;
						break;
					case 1:
						// 处理索引1的逻辑
						this.$confirm('敬请期待')
							.then(_ => {})
							.catch(_ => {});
						break;
					case 2:
						// 处理索引2的逻辑 => 新增
						console.log('2')
				}
			},
			// 获得焦点
			focusManufact(){
				this.getDataM();
			},
			// 下拉框无限滚动 ==> 厂家
			handleManufacturerScroll () {
				this.indexTime += 1;
				// console.log('indextimeNum'+this.indexTime,'当前条数='+this.pageSizeSave,'总条数：' + this.totalSize);	
				setTimeout(async() =>{
					this.loading = false
					if(this.pageSizeSave >= this.totalSize){
						// console.log('到底了');
						this.loading = false
						this.loading == false ? this.titSpell1 : this.titSpell
						this.showLoading = true
					}else{
						// console.log('当前请求页数'+this.pageNum,'可继续滚动');
						this.loading = true
						this.pageNum +=1
						// 每隔一段时间执行逻辑
						let res = await getManufacturer({
							manufacturerName: this.manufacturerName,
							pageNum: this.pageNum,
							pageSize: this.pageSize
						})
						this.SelectmanufacturerName = [...this.SelectmanufacturerName,...res.data.content]
						// 保存当前页条数
						this.pageSizeSave = this.SelectmanufacturerName.length
						// console.log(this.pageSizeSave);
					}
				},88)
			},
			// input
			inputLabel(){
				this.addForm.code = this.makePy(this.addForm.dosageName).toLocaleUpperCase().slice(0,1) + this.formattedNumber + this.CodeNumber;//编码
				this.addForm.pinyinCode = this.makePy(this.addForm.dosageName).toLocaleUpperCase();//拼音简码
			},

			// 步骤
			handClick(i) {
				// i event
				switch (i) {
					case 0:
						// 处理索引0的逻辑
						this.loading = true;
						if(this.searchValue == ''){
							setTimeout(() => {
								this.$message.error('关键字不能为空！');
								this.loading = false;		
							}, 1500)
						}else{
							setTimeout(() => {
								this.loadData();
								this.loading = false;		
							}, 1500)
							
						}
						break;
					case 1:
						// 处理索引1的逻辑
						this.$confirm('敬请期待')
							.then(_ => {})
							.catch(_ => {});
						break;
					case 2:
						// 处理索引2的逻辑 => 新增
						this.addDialogVisible = true
						break;
				}
			},
			handleCommand(command) {
			  // console.log(command);
			  // 根据 command 值执行相应的逻辑
			  switch (command) {
				case 'a':
				  // 处理a的逻辑
				  console.log('执行A逻辑');
				  this.DropDownedName = '可用'
				  break;
				case 'b':
				  // 处理b的逻辑
				  console.log('执行B逻辑');
				  this.DropDownedName = '禁用'
				  break;
				case 'c':
				  // 处理b的逻辑
				  this.DropDownedName = '全部'
				  break;
				// ... 其他 case
			  }
			},
			//分页
			//每页条数改变触发
			handleSizeChange(val) {
				console.log(`每页 ${val} 条`);
				this.pageNum = val;
			},
			//当前条数改变触发
			handleCurrentChange(val) {
				console.log(`当前页: ${val}`);
				this.pageNum = val;
			},
			
		}
	}
</script>

<style lang="less" scoped>
	// 穿透
	/deep/ .el-icon-arrow-left:before {
	    content: "\e67d";
	    font-size: 18px;
	}
	/deep/ .el-select-dropdown__list{
	    height: 60px !important;
	}
	/deep/ .el-dropdown-menu__item{
		font-size: 12px;
	}
	/deep/ .el-dialog__title{
		font-size: 12px;
		color: #fff;
	}
	/deep/ .el-dialog__headerbtn{
		top: 12px;
	}
	/deep/ .el-dialog__headerbtn .el-dialog__close{
		color: #fff;
	}
	/deep/ .el-dialog__headerbtn .el-dialog__close:hover{
		color: #00007f;
	}
	/deep/ .el-dialog__header{
		background-color: #39648f;
		padding: 8px;
	}
	/deep/ .el-dialog__body{
		padding: 0 20px 0 20px;
		border: 1px solid #efefef;
		padding: 8px;
	}
	/deep/ .el-descriptions{
		font-size: 12px !important;
	}
	/deep/ .el-descriptions-item__container{
		display: flex !important;
		// align-items: center !important;
		padding-top: 12px !important;
	}
	/deep/ .el-descriptions-item__label:not(.is-bordered-label){
		padding-left: 0;
		width: 66px;
		display: flex;
		justify-content: right;
	}
	/deep/ .el-color-picker__icon, .el-input, .el-textarea{
		width: 100%;
	}
	// content
	.MedicenCata {
		height: 100%;
		width: 100%;
		// header
		.header {
			display: flex;
			flex-direction: row;
			align-items: center;
			height: 40px;
			background-color: #efefef;
			padding: 4px;

			// justify-content: space-evenly;
			// icon
			.header-icon {
				display: flex;
				align-items: center;
			}

		}

		// main
		.main {
			width: 100%;
			display: flex;
			justify-content: left;
			height: 473px; /* 设置父容器的高度 */
			overflow-y: auto; /* 当内容超出容器高度时显示垂直滚动条 */
			// left
			.main-left {
				.custom-tree {
				  max-height: 100%; /* 设置树形菜单的最大高度为父容器的100% */
				  overflow-y: auto; /* 当内容超出设定高度时显示滚动条 */
				}
				/deep/ .el-tree-node__content {
					height: 40px;
					padding-left: 0 !important;
				}
				/deep/ .el-tree-node__label{
					font-size: 12px;
				}
				/deep/ .el-tree-node{
					// background-color: #e8e8e8;
				}
				width: 188px;
				height: 100%;
				// background-color: #e8e8e8;
			}

			// right
			.main-right {
				width: 90%;
				height: 100%;
				// icon
				.main-icon {
					display: flex;
					align-items: center;
					padding: 12px;
					line-height: 40px;
					.main-icon-a{
						// width: 240px;
						// background-color: #00557f;
					}
					.main-icon-b{
						margin-left: 28px;
						/deep/ .el-dropdown{
							font-size: 12px;
							cursor: pointer;
						}
						/deep/ .el-dropdown:hover {
							font-weight: bold;
							color: #66b1ff;
						}
						/deep/ .el-icon--right{
							// background-color: #66b1ff;
						}
						/deep/ .el-popper[x-placement^=bottom]{
							margin-top: 0;
						}
					}
					// c
					.main-icon-c{
						display: flex;
						margin-left: 28px;
						/deep/ [data-v-2bacc09b] .el-color-picker__icon, .el-input[data-v-2bacc09b], .el-textarea[data-v-2bacc09b]{
							width: 80%;
						}
					}
				}
				// table
				/deep/ .el-table .cell{
					font-size: 12px;
					text-align: center;
				}
				/deep/ .el-form-item__content{
					display: flex;
				}
				.addformhead{
					padding: 8px;
				}
				.addformheadA{
					padding: 8px;
					margin-top: -28px;
				}
				.addformheadB{
					display: flex;
					border-top: 2px solid #ebebeb;
					padding: 8px;
					margin-top: -8px;
					.addOne{
						margin-top: 20px;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						
						span{
							font-size: 12px;
							width: 64px;
							font-weight: bold;
						}
						.have{
							color: brown;
							width: 20px;
						}
						/deep/ .el-input{
							width: 142px;
						}
					}
					.addOne2{
						// width: 288px;
						margin-top: 20px;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						// align-items: flex-start;
						margin-left: -28px;
						span{
							font-size: 12px;
							width: 78px;
							font-weight: bold;
						}
						.have{
							color: brown;
							width: 20px;
						}
						.duan{
							.star{
								color: brown;
								width: 4px;
							}
							/deep/ .el-select>.el-input{
								width: 68px;
								height: 28px;
							}
						}
						/deep/ .el-input{
							width: 188px;
						}
					}
					.addOne3{
						// width: 288px;
						margin-top: 20px;
						margin-left: -28px;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						align-items: flex-end;
						span{
							font-size: 12px;
							width: 78px;
							font-weight: bold;
						}
						.duan{
							.star{
								color: brown;
								width: 4px;
							}
							/deep/ .el-select>.el-input{
								width: 88px;
							}
						}
						/deep/ .el-input{
							width: 128px;
						}
					}
				}
				.addOne4{
					/deep/ .el-textarea__inner{
						width: 460px;
					}
					// width: 288px;
					display: flex;
					justify-content: start;
					margin-left: 8px;
					span{
						font-size: 12px;
						width: 78px;
						font-weight: bold;
					}
					.duan{
						.star{
							width: 4px;
							color: brown;
						}
						/deep/ .el-select>.el-input{
							width: 88px;
						}
					}
					/deep/ .el-input{
						width: 128px;
					}
				}
				.table{
					width: 1088px;
					padding: 12px;
				}
			}
		}

		// feet
		.feet {
			// alert
			.messagesBox{
				/deep/ .el-dialog__title{
					font-size: 12px;
				}
				/deep/ .el-table{
					font-size: 12px;
				}
			}
			.sonPriceDiglog{
				
				.addManufacturer{
					display: flex;
					justify-content: space-between;
					padding: 12px;
					.addManufacturerL{
						display: flex;
						align-items: flex-start;
						flex-direction: column;
						.elfbox{
							display: flex;
							justify-content: space-between;
							width: 228px;
						}
						/deep/ .el-select>.el-input{
							width: 128px;
						}
					}
					.addManufacturerR{
						display: flex;
						align-items: flex-end;
						flex-direction: column;
						.elfbox{
							display: flex;
							justify-content: space-between;
							width: 228px;
						}
						/deep/ .el-select>.el-input{
							width: 128px;
						}
					}
				}
				
			}
			
		}

	}
</style>

<style lang="less">
.selectManufacturerFrom{
	border: 1px solid #7c8b9a !important;
	top: 188px !important;
	left: 508px !important;
	border-radius: 5px;
	display: flex;
	justify-content: space-between;
	.abox{
		  display: flex;
		  border-top: 1px solid #f8f8f8; /* 上边框 */
		  border-bottom: none; /* 下边框 */
		  border-left: none; /* 左边框 */
		  border-right: none; /* 右边框 */
		.Adata{
			display: inline-block;
			width: 48px;
			white-space: nowrap;
			overflow: hidden;
			text-align: left;
			text-overflow: ellipsis;
			color: #66b1ff;
		}
		.Adata:nth-child(4){
			display: inline-block;
			width: 288px;
			white-space: nowrap;
			overflow: hidden;
			text-align: left;
			text-overflow: ellipsis;
			color: #66b1ff;
		}
		.Adata:nth-last-child{
			display: inline-block;
			width: 68px;
			white-space: nowrap;
			overflow: hidden;
			text-align: left;
			text-overflow: ellipsis;
			color: #66b1ff;
		}
		.fixedData{
			font-size: 12px;
			font-weight: bold;
			color: #353535;
		}
		  span{
		  	font-size: 12px;
	
		  	margin-left: 4px;
		  }
	}
	.popper__arrow {
	  border-bottom-color: #7c8b9a !important;
	}
	.popper__arrow::after {
	  border-bottom-color: #7c8b9a !important;
	  top: 0 !important;
	  // margin-top:   2px;
	}
}
.selectFrom {
  height: 60px;
  border: 1px solid #7c8b9a !important;
  top: 188px !important;
  left: 400px !important;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  
  .abox{
	  display: flex;
	  border-top: 1px solid #f8f8f8; /* 上边框 */
	  border-bottom: none; /* 下边框 */
	  border-left: none; /* 左边框 */
	  border-right: none; /* 右边框 */
	.Adata{
		display: inline-block;
		width: 88px;
		white-space: nowrap;
		overflow: hidden;
		text-align: left;
		text-overflow: ellipsis;
		color: #66b1ff;
	}
	.fixedData{
		font-size: 12px;
		font-weight: bold;
		color: #353535;
	}
	  span{
	  	font-size: 12px;

	  	margin-left: 4px;
	  }
  }

  .popper__arrow {
    border-bottom-color: #7c8b9a !important;
  }
  .popper__arrow::after {
    border-bottom-color: #7c8b9a !important;
    top: 0 !important;
    // margin-top:   2px;
  }
}
</style>
